/**
 * @file      jsondata.h
 * @copyright Copyright (c) 2019, CYG-ZCW Co., Ltd. All Rights Reserved.
 * @brief     brief
 * @author    caiwang213@qq.com
 * @date      2019-06-19 13:43:27
 *
 * @note
 *  jsondata.h defines
 */
#ifndef __JSONDATA_H__
#define __JSONDATA_H__
#include <QJsonObject>
class JsonData : public QJsonObject
{
public:
    JsonData() {};
    JsonData(const QJsonObject &obj) { *((QJsonObject *)this) = obj; }

protected:
    void               setValue(const QString &key, const QJsonValue &value) { this->insert(key, value); }
    QJsonValue         getValue(const QString &key) const { return (*this)[key]; }
};
#endif
